<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "b_course_knowledge_point".
 *
 * @property string $id
 * @property string $name 标题
 * @property string $content 描述
 * @property string $course_id 课程id
 * @property string $major_id
 * @property string $create_by
 * @property string $create_time
 * @property string $update_by
 * @property string $update_time
 * @property int $del_flag
 */
class BCourseKnowledgePoint extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'b_course_knowledge_point';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id', 'name','create_time', 'del_flag'], 'required'],
            [['create_time', 'update_time'], 'safe'],
            [['del_flag'], 'integer'],
            [['id', 'course_id', 'major_id', 'create_by', 'update_by'], 'string', 'max' => 36],
            [['name'], 'string', 'max' => 255],
            [['content'], 'string', 'max' => 512],
            [['id'], 'unique'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'name' => 'Name',
            'content' => 'Content',
            'course_id' => 'Course ID',
            'major_id' => 'Major ID',
            'create_by' => 'Create By',
            'create_time' => 'Create Time',
            'update_by' => 'Update By',
            'update_time' => 'Update Time',
            'del_flag' => 'Del Flag',
        ];
    }
}
